<template>
  <div class="dingdan">
    <div class="content">
      <van-nav-bar title="确认订单" left-arrow @click-left="onClickLeft" />
      <p class="tishi">
        本次购买怎么样怎么样怎么样怎么样点点滴滴样怎么样怎么样点点滴的点点滴滴样怎么样怎么样点点滴
      </p>
      <div class="xinxi">
        <h4>课程名字</h4>
        <div class="yulan">
          <img src="../../assets/image/lc.jpg" alt="" />
          <div class="x-jieshao">
            <p>名字</p>
            <p>介绍</p>
            <p>price</p>
          </div>
        </div>
        <p class="minPrice">小价格</p>
        <p class="bigPrice">大价格</p>
      </div>
      <div class="zongjia">
        <p class="zongPrice">总价</p>
      </div>
    </div>

    <div class="bottom">
      <span>当前价格为</span>
      <span>2</span>
      <van-button type="danger" class="tijiao" @click="tiaozhuan">提交订单</van-button>
    </div>
  </div>
</template>

<script>
export default {
  methods: {
    onClickLeft() {
      this.$router.go(-1);
    },
    tiaozhuan(){
      this.$router.push({name:'learner'})
    }
  },
};
</script>

<style lang="scss">
.dingdan {
  background-color: #eee;
  display: flex;
  flex-direction: column;
  .content{
      flex: 1;
    display: flex;
  flex-direction: column;
  }
  .tishi {
    margin-top: 5px;
    padding: 0 8px;
    padding-top: 5px;
    font-size: 12px;
    height: 44px;
    color: #ccc;
    background-color: #fff;
  }
  .xinxi {
    margin-top: 8px;
    background-color: #fff;
    padding-top: 8px;
    padding-left: 5px;
    > h4 {
      font-weight: normal;
      height: 36px;
      line-height: 36px;
      font-size: 14px;
      color: #bbb;
    }
    .yulan {
      display: flex;
      height: 88px;
      img {
        width: 50%;
      }
      > div {
        flex: 1;
        padding-left: 8px;
      }
      .x-jieshao {
        p {
          font-size: 12px;
          color: #233;
        }
        p:nth-of-type(1) {
          height: 40px;
          padding-top: 8px;
        }
        p:nth-of-type(2) {
          height: 20px;
          margin-bottom: 4px;
        }
      }
    }
    .minPrice,
    .bigPrice {
      text-align: right;
      padding-right: 10px;
      color: #bbb;
    }
    .minPrice {
      height: 32px;
      font-size: 12px;
      margin-top: 12px;
    }
    .bigPrice {
      font-size: 16px;
      height: 40px;
    }
  }
  .zongjia {
    background-color: #fff;
    margin-top: 20px;
    flex: 1;
    .zongPrice {
      text-align: right;
      padding-right: 12px;
      color: #bbb;
    }
  }
  .bottom{
      display: flex;
      justify-content: space-between;
      span{
          line-height: 44px;
          font-size: 14px;
          
      }

      span:nth-of-type(2){
          flex: 1;
          text-indent: 1rem;
          color: #ff2832;
      }

  }
}
</style>
